﻿using Hehq.Core.AppsImpl.Attributes;
using Hehq.Sys.Apps.Malls;
using Hehq.Sys.Apps.Malls.Dtos;
using Hehq.Sys.Apps.Malls.Dtos.Params;
using Hehq.Sys.Services.Configs.Apps.BnsMo;
using Hehq.Tenant.WebApi.Mall.Dtos;
using Hehq.Tenant.WebApi.Mall.Dtos.Params;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hehq.Tenant.WebApi.Mall
{
    [PerModule(220,"商城维护")]
    public class AppService:AbsWebApp<IMallApp>, IWebApi
    {
        /// <summary>
        /// 获取所有商城
        /// </summary>
        /// <returns></returns>
        public List<MallItem> GetItems()
        {
            return this.App.GetByTid(this.CurrentUser.TID);
        }

        /// <summary>
        /// 获取商城详情
        /// </summary>
        /// <returns></returns>
        public MallItem GetDetail(MallMainKey param) {
            return this.App.ByID(param.ID);
        }


        public List<SysAppInfo> GetNotRelMallAppInfos()
        {
            return null;
        }

        public bool SetMallSysApp(MallAppInfoParam param)
        {

            return false;
        }

        /// <summary>
        /// 设置商城
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public bool SetMallRelThirdApp(MallMainKey param)
        {
            return false;
        }

        /// <summary>
        /// 发布商城
        /// </summary>
        /// <returns></returns>
        public bool Publish(MainMainKey key)
        {
            return false;
        }

        /// <summary>
        /// 取消发布
        /// </summary>
        /// <returns></returns>
        public bool UnPublish(MainMainKey key)
        {
            return false;
        }
    }
}
